import {Service} from "adajs";

class CourseService extends Service {
	defaultData() {
		return {
			list: []
		}
	}

	onupdate(current, {list}) {
		current.list = list.map(item => {
			let _item = Object.assign({}, item);
			_item.time = item.publishTime;
			return _item;
		});
	}
}

export default CourseService;